package com.fastadmin.pojo;

import com.xphsc.easyjdbc.annotation.CreatedDate;
import com.xphsc.easyjdbc.annotation.ModifiedDate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder(toBuilder = true)
@Table(name = "f_user")
@Entity
@ApiModel(description = "前台用户类")
public class FUser extends BaseEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Long id;
    @CreatedDate
    protected Date create_time;
    @ModifiedDate
    protected Date update_time;
    //------------------------------------------------
    @ApiModelProperty("用户名") private String username;
    @ApiModelProperty("密码") private String password;
    @ApiModelProperty("邮箱")private String email;
    @ApiModelProperty("手机")private String phone;
    @ApiModelProperty("性别")private Integer sex;
    @ApiModelProperty("头像")private String avatar;
    @ApiModelProperty("微信id")private String open_id;
    @ApiModelProperty("状态")private int status;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reset_password_time;
    @ApiModelProperty("城市")private String city;
    @ApiModelProperty("国家")private String country;
    @ApiModelProperty("省份")private String province;
    @ApiModelProperty("昵称")private String nickname;
}
